
local MainScene = class("MainScene", function()
    return display.newScene("MainScene")
end)

function MainScene:ctor()
	print("mainscene:ctor()");
	display.addSpriteFrames("fruit.plist","fruit.pvr.ccz")
	display.newSprite("background.png")
		:pos(display.cx,display.cy)
		:addTo(self)

	local startBtnImg = {
		normal = "startBtn_n.png";
		pressed = "startBtn_p.png";
	}
	cc.ui.UIPushButton.new(startBtnImg,{scale9 = false})
		:onButtonClicked(function()
			-- local playscene = import("app.scenes.playScene"):new()
			-- display.replaceScene(playscene,"turnOffTiles",0.5)

			app:enterScene("PlayScene", "FADE");
		end)
		:align(display.CENTER,display.cx, display.cy)
		:addTo(self)
end

function MainScene:onEnter()
	print("mainscene:onEnter()");
end

function MainScene:onExit()
	print("mainscene:onExit()");
end

return MainScene;
